package com.oristand.printer.address.util;

import javafx.scene.input.KeyCode;
import javafx.scene.input.KeyCodeCombination;
import javafx.scene.input.KeyCombination;

import java.text.SimpleDateFormat;

/**
 * @author chenkailiang
 * @date 2020/9/24
 */
public class Constants {

    public static  SimpleDateFormat FORMAT = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");

    public static final String CONNECTION_TYPE_USB = "USB";
    public static final KeyCodeCombination KEY_CODE_COMBINATION = new KeyCodeCombination(KeyCode.C, KeyCombination.CONTROL_ANY);
    public static final String BUTTON_STYLE = "-fx-background-insets: 0;-fx-background-color: transparent;-fx-text-fill: blue;";
    public static final String BUTTON_GREY = "-fx-background-insets: 0;-fx-background-color: transparent;-fx-text-fill: grey;";
    public static final String BUTTON_HAND = "-fx-background-insets: 0;-fx-background-color: transparent;-fx-text-fill: blue;-fx-cursor: hand;";
    public static final String BUTTON_GREY_HAND = "-fx-background-insets: 0;-fx-background-color: transparent;-fx-text-fill: grey;-fx-cursor: hand;";
    public static final String BUTTON_COLOR = "-fx-border-width: 2;\n" +
            "    -fx-background-color: #338FE5;\n" +
            "    -fx-font-size: 11pt;\n" +
            "    -fx-text-fill: white;";
    public static final String BUTTON_DISABLE = "-fx-background-color:grey;";

    public static final String SOFT_ERROR = "There is a small problem with the software,please try again or restart the software.";

    public static final String PRINTER_NOT_CONNECTED = "The Printer is not connected,please check.";

    public static final String FILE_DOWNLOAD_FAIL = "File download failed, please try again";

    public static final String DATABASE_ERROR = "Database connection failed, please contact IT.";

    public static final String FILE_NOT_FOUND= "The file cannot be found, please select the print file again.";

    public static final String NO_SHIPPING_LABEL_PRINTED = "No shipping label can be printed";

    public static final String NO_FILE = "No file will be printed";


    /**
     *  存放文件打印记录
     */
    static final String LOCAL_PRINT_RECORD = "resources/db/printRecord.db";
    static final String PRINT_RECORD_NAME = "printRecord";

    /**
     * 存放具体label打印记录
     */
    static final String LOCAL_PRINT_LABEL_RECORD = "resources/db/printLabelRecord.db";
    static final String PRINT_LABEL_RECORD_NAME = "printLabelRecord";

    /**
     * 存放打印机配置
     */
    static final String LOCAL_PRINTER_CONFIGURATION = "resources/db/printerConfiguration.db";
    static final String PRINTER_CONFIGURATION_NAME = "printerConfiguration";

    static final String WARNING_LABEL = "65 Warning";
    static final String S2S_LABEL = "Wal-Mart Associate Scan ASN Below";

    /**
     * YES
     */
    public static final String YES = "yes";

    /**
     * zpl结束字符 转义
     */
    public static final String ZPL_END_ESCAPE = "\\^XZ";

    /**
     * zpl结束字符
     */
    public static final String ZPL_END = "^XZ";

    /**
     * 空格
     */
    public static final String SPACE = " ";


    /**
     * 未选择打印机
     */
    public static final String PRINTER_NOT_CHOOSE = "Please select a printer";

    /**
     * 测试label内容
     */
    public static final String TEST_LABEL = "^XA^CF,0,0,0^PR26^MD30^PW800^PON^CI13^LH0,20\n" +
            "^FO12,124^GB755,2,2^FS\n" +
            "^FO12,390^GB777,2,2^FS\n" +
            "^FO32,3^AdN,0,0^FWN^FH^FDFROM:^FS\n" +
            "^FO32,19^AdN,0,0^FWN^FH^FDTest Test^FS\n" +
            "^FO32,37^AdN,0,0^FWN^FH^FD^FS\n" +
            "^FO32,55^AdN,0,0^FWN^FH^FD111 Test TestTest TestRD^FS\n" +
            "^FO32,73^AdN,0,0^FWN^FH^FD^FS\n" +
            "^FO32,109^AdN,0,0^FWN^FH^FDUS ^FS\n" +
            "^FO224,3^AdN,0,0^FWN^FH^FD(111) 111-1111^FS\n" +
            "^FO478,37^AdN,0,0^FWN^FH^FDCAD: 111111111111111111FS\n" +
            "^FO28,742^A0N,24,24^FWN^FH^FDTRK#^FS\n" +
            "^FO28,800^A0N,27,32^FWN^FH^FD^FS\n" +
            "^FO136,712^A0N,27,36^FWN^FH^FD^FS\n" +
            "^FO32,91^AdN,0,0^FWN^FH^FDDayton NJ 08810^FS\n" +
            "^FO478,3^AdN,0,0^FWN^FH^FDSHIP DATE: 03AUG20^FS\n" +
            "^FO478,19^AdN,0,0^FWN^FH^FDACTWGT: 3.00 LB^FS\n" +
            "^FO478,91^AdN,0,0^FWN^FH^FDBILL SENDER^FS\n" +
            "^FO39,136^A0N,39,39^FWN^FH^FDTest TestTest Test^FS\n" +
            "^FO39,178^A0N,39,39^FWN^FH^FD^FS\n" +
            "^FO39,220^A0N,39,39^FWN^FH^FD111 Testest Street^FS\n" +
            "^FO39,262^A0N,39,39^FWN^FH^FD**TEST LABEL - DO NOT SHIP**^FS\n" +
            "^FO39,347^AdN,0,0^FWN^FH^FD(111) 111-1100^FS\n" +
            "^FO39,304^A0N,43,40^FWN^FH^FDMartin TN 55555^FS\n" +
            "^FO719,304^A0N,43,40^FWN^FH^FD(US)^FS\n" +
            "^FO709,440^A0N,19,26^FWN^FH^FDGround^FS\n" +
            "^FO689,480^A0N,128,137^FWN^FH^FDG^FS\n" +
            "^FO677,462^GB104,10,10^FS\n" +
            "^FO677,472^GB10,112,10^FS\n" +
            "^FO771,472^GB10,112,10^FS\n" +
            "^FO677,584^GB104,10,10^FS\n" +
            "^FO464,--^GB2,126,2^FS\n" +
            "^FO654,402^A0N,43,58^FWN^FH^FDFedEx^FS\n" +
            "^FO709,440^A0N,19,26^FWN^FH^FDGround^FS\n" +
            "^FO689,480^A0N,128,137^FWN^FH^FDG^FS\n" +
            "^FO791,493^A0N,13,18^FWB^FH^FDJ202020070601uv^FS\n" +
            "^FO9,136^A0N,21,21^FWN^FH^FDTO^FS\n" +
            "^FO21,412^BY2,2^B7N,10,5,14^FH^FWN^FH^FD9387240932hjoawejrfoiasdhfoiauyerasdadsteasefdasfdasedfaasdfas2342dfwefwefwefaasdfasdfasdertwewerfwefwerwefwefwrwfeweffasgerg4e43543534r3r43r34rsdfasdfasdfwtasasdfasdgfasgaeg34t4ewfsf4ewf4erwfw43r345345faegfaegfasegfasegfaegfawefaesfasefawefaewrfaesfaseffeasdf8^FS\n" +
            "^FO28,837^A0N,107,96^FWN^FH^FD^FS\n" +
            "^FO12,681^GB777,2,2^FS\n" +
            "^FO494,885^A0N,43,43^FWN^FH^FD^FS\n" +
            "^FO788,28^AbN,11,7^FWB^FH^FD56BJ2/7709/B766^FS\n" +
            "^FO95,746^A0N,53,40^FWN^FH^FD7777 7777 7777^FS\n" +
            "^FO409,695^A0N,51,38^FWN^FH^FB390,,,R,^FD                   ^FS\n" +
            "^FO404,747^A0N,51,38^FWN^FH^FB400,,,R,^FD                   ^FS\n" +
            "^FO413,799^A0N,40,40^FWN^FH^FB386,,,R,^FD                ^FS\n" +
            "^FO495,841^A0N,44,44^FWN^FH^FB298,,,R,^FD     38237^FS\n" +
            "^FO574,901^A0N,24,24^FWN^FH^FB120,,,R,^FD      ^FS\n" +
            "^FO695,885^A0N,43,43^FWN^FH^FB100,,,R,^FD   ^FS\n" +
            "^FO39,927^A0N,27,36^FWN^FH^FD3333 2222 0 (000 800 0264) 0 00 8888 8888 8888^FS\n" +
            "^FO75,968^BY3,2^BCN,200,N,N,N,N^FWN^FD>;9622001900008000111000000000000000^FS\n" +
            "^FO478,55^AdN,0,0^FWN^FH^FDDIMMED: 5 X 2 X 2 IN^FS\n" +
            "^FO329,349^AbN,11,7^FWN^FH^FDREF: TEST_5FREFERENCE^FS\n" +
            "^FO39,363^AbN,11,7^FWN^FH^FDINV: REF: ORDER# 193185774 1 OF 1^FS\n" +
            "^FO39,377^AbN,11,7^FWN^FH^FDPO: TEST_5FPO_5FNUMBER^FS\n" +
            "^FO429,377^AbN,11,7^FWN^FH^FDDEPT: WF000000BBB^FS\n" +
            "^PQ1\n" +
            "^XZ\n";
}
